package com.company.cloud.point.modules.mgr.controller;

import com.company.cloud.common.asserts.ValidatorUtils;
import com.company.cloud.common.auth.annotation.Authc;
import com.company.cloud.common.bean.BaseResult;
import com.company.cloud.common.bean.IdIntParam;
import com.company.cloud.common.bean.IdStrParam;
import com.company.cloud.point.modules.cache.models.PointRuleConfigModel;
import com.company.cloud.point.modules.cache.models.TaskConfigModel;
import com.company.cloud.point.modules.mgr.controller.req.*;
import com.company.common.server.config.cloud.ProjectConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Log4j2
@Authc
@RestController
@RequestMapping("/mgr/task/config")
@Api(tags="UMP_Mgr_任务管理")
public class TaskConfigMgrController {


    @Autowired
    private ProjectConfig projectConfig;


    @PostMapping("/query")
    @ApiOperation(value="任务规则查询", response= TaskConfigModel.class)
    public BaseResult query(@RequestBody TaskConfigQuery4PageParam params) {
        ValidatorUtils.validate(params);
        return BaseResult.ok();
    }



    @PostMapping("/save")
    @ApiOperation(value="任务规则新增", response=BaseResult.class)
    public BaseResult save(@RequestBody TaskConfigSaveParam params) {
        ValidatorUtils.validate(params);
        return BaseResult.ok();
    }

    @PostMapping("/update")
    @ApiOperation(value="任务规则修改", response=BaseResult.class)
    public BaseResult save(@RequestBody TaskConfigUpdateParam params) {
        ValidatorUtils.validate(params);
        return BaseResult.ok();
    }


    @PostMapping("/info")
    @ApiOperation(value="任务规则信息", response=PointRuleConfigModel.class)
    public BaseResult info(@RequestBody IdStrParam params) {
        ValidatorUtils.validate(params);
        return BaseResult.ok();
    }

    @PostMapping("/del")
    @ApiOperation(value="任务规则删除", response=BaseResult.class)
    public BaseResult del(@RequestBody IdStrParam params) {
        ValidatorUtils.validate(params);
        return BaseResult.ok();
    }

}
